var task_id = GetQueryString('task_id');
var modifyData;
var qxlist;
var dhbm = dhbm_bjlr;
var processDefKey = "minbobianmu";
var readflag = false;
$(document).ready(function () {
	var result = ajaxResult("get",false,"/cnmuseum/bm/getdetail",{"task_id":task_id});
    if (result.status == 'OK') {
        modifyData = result.data;
    }
    getUserInfo();
    qxlist = UserInfo.qxlist;
    loadAddHtml();
});
//数据录入的保存
function save(ele){ 
	$("a[name=btn]").button('loading').delay(1000).queue(function() {
		$("a[name=btn]").button('reset');
		$("a[name=btn]").dequeue(); 
	});
	$(ele).button('loading').delay(1000).queue(function() {
		$(ele).button('reset');
		$(ele).dequeue(); 
    var params = $('#addForm').serializeObject();
	var result=ajaxResult('POST',false,'/cnmuseum/bm/save',params);
    if (result.status == 'OK') {
        alertFunc('保存成功', function () {
            window.location.href = 'zjlr.html';
        });
    }
	});
}
//数据录入的提交
function submit(ele){
	$("a[name=btn]").button('loading').delay(1000).queue(function() {
		$("a[name=btn]").button('reset');
		$("a[name=btn]").dequeue(); 
	});
	$(ele).button('loading').delay(1000).queue(function() {
		$(ele).button('reset');
		$(ele).dequeue(); 
	var params=$('#addForm').serializeObject();
	params.next='bm';
	var result=ajaxResult('POST',false,'/cnmuseum/bm/submit',params);
    if (result.status == 'OK') {
        alertFunc('提交成功', function () {
            window.location.href = 'zjlr.html';
        });
    }
	});
}